package sj.System.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import sj.System.dao.storage.StorageRecordMapper;
import sj.System.pojo.StorageRecord;
import sj.System.service.StorageService;

@Transactional
public class StorageServiceImpl implements StorageService {

    private StorageRecordMapper storageRecordMapper;
    public StorageRecordMapper getStorageRecordMapper() {
        return storageRecordMapper;
    }

    public void setStorageRecordMapper(StorageRecordMapper storageRecordMapper) {
        this.storageRecordMapper = storageRecordMapper;
    }

    /**
     * 增加
     *
     * @param storageRecord
     * @return
     */
    @Override
    public boolean addStorage_record(StorageRecord storageRecord) {
        if(storageRecordMapper.addStorage_record(storageRecord)==1){
            return true;
        }
        return false;
    }

    /**
     * 删除
     *
     * @param id
     * @return
     */
    @Override
    public boolean delStorage_record(Integer id) {
        if(storageRecordMapper.delStorage_record(id)==1){
            return true;
        }
        return false;
    }

    /**
     * 修改
     *
     * @param storageRecord
     * @return
     */
    @Override
    public boolean updateStorage_record(StorageRecord storageRecord) {
        if(storageRecordMapper.updateStorage_record(storageRecord)==1){
            return true;
        }
        return false;
    }

}
